{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "b5623609",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入工具包\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib as mpl\n",
    "from IPython.display import Image\n",
    "import time\n",
    "import warnings\n",
    "import seaborn as sns\n",
    "warnings.filterwarnings('ignore')\n",
    "%matplotlib inline\n",
    "mpl.rcParams['font.sans-serif']=['SimHei']  #设置字体样式以正常显示中文标签\n",
    "mpl.rcParams['axes.unicode_minus']=False   #设置正常显示字符\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "bdbacd13",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>store_id</th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>658</td>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>4</td>\n",
       "      <td>796.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>59</td>\n",
       "      <td>199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>146</td>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>运动</td>\n",
       "      <td>1</td>\n",
       "      <td>149.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>70</td>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>&gt;=60</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>2</td>\n",
       "      <td>178.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>658</td>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>229</td>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>20-24</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>袜子</td>\n",
       "      <td>2</td>\n",
       "      <td>65.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22288</th>\n",
       "      <td>146</td>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>30-34</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>短裤</td>\n",
       "      <td>1</td>\n",
       "      <td>80.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>19</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22289</th>\n",
       "      <td>430</td>\n",
       "      <td>成都</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22290</th>\n",
       "      <td>449</td>\n",
       "      <td>武汉</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>35-39</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>158.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22291</th>\n",
       "      <td>758</td>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>20-24</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>袜子</td>\n",
       "      <td>1</td>\n",
       "      <td>26.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22292</th>\n",
       "      <td>616</td>\n",
       "      <td>成都</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>30-34</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>59</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22293 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       store_id city channel gender_group age_group  wkd_ind product  \\\n",
       "0           658   深圳      线下       Female     25-29  Weekday    当季新品   \n",
       "1           146   杭州      线下       Female     25-29  Weekday      运动   \n",
       "2            70   深圳      线下         Male      >=60  Weekday      T恤   \n",
       "3           658   深圳      线下       Female     25-29  Weekday      T恤   \n",
       "4           229   深圳      线下         Male     20-24  Weekend      袜子   \n",
       "...         ...  ...     ...          ...       ...      ...     ...   \n",
       "22288       146   杭州      线下       Female     30-34  Weekday      短裤   \n",
       "22289       430   成都      线下       Female     25-29  Weekend      T恤   \n",
       "22290       449   武汉      线下       Female     35-39  Weekday      T恤   \n",
       "22291       758   杭州      线下       Female     20-24  Weekday      袜子   \n",
       "22292       616   成都      线下         Male     30-34  Weekday    当季新品   \n",
       "\n",
       "       customer  revenue  order  quant  unit_cost  unit_price  \n",
       "0             4    796.0      4      4         59         199  \n",
       "1             1    149.0      1      1         49         149  \n",
       "2             2    178.0      2      2         49          89  \n",
       "3             1     59.0      1      1         49          59  \n",
       "4             2     65.0      2      3          9          22  \n",
       "...         ...      ...    ...    ...        ...         ...  \n",
       "22288         1     80.0      1      2         19          40  \n",
       "22289         1     79.0      1      1         49          79  \n",
       "22290         1    158.0      1      2         49          79  \n",
       "22291         1     26.0      1      1          9          26  \n",
       "22292         1     79.0      1      1         59          79  \n",
       "\n",
       "[22293 rows x 13 columns]"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#导入数据集\n",
    "data1 = pd.read_csv(r'C:/Users/lenovo/OneDrive/桌面/uniqlo.csv')\n",
    "data1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "47d831dc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(22293, 13)"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#查看数据规模\n",
    "data1.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "5b9cdf94",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3208"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#3、数据清洗：检测重复值个数\n",
    "data1.duplicated().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "00cadac8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>store_id</th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>217</th>\n",
       "      <td>245</td>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>30-34</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>59</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>518</th>\n",
       "      <td>335</td>\n",
       "      <td>上海</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>30-34</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>574</th>\n",
       "      <td>315</td>\n",
       "      <td>武汉</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>669</th>\n",
       "      <td>802</td>\n",
       "      <td>西安</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>&gt;=60</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>810</th>\n",
       "      <td>325</td>\n",
       "      <td>上海</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>牛仔裤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>69</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22277</th>\n",
       "      <td>611</td>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>20-24</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22278</th>\n",
       "      <td>70</td>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>&gt;=60</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>短裤</td>\n",
       "      <td>1</td>\n",
       "      <td>40.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>19</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22280</th>\n",
       "      <td>21</td>\n",
       "      <td>北京</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>35-39</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22289</th>\n",
       "      <td>430</td>\n",
       "      <td>成都</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22290</th>\n",
       "      <td>449</td>\n",
       "      <td>武汉</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>35-39</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>158.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3208 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       store_id city channel gender_group age_group  wkd_ind product  \\\n",
       "217         245   杭州      线下       Female     30-34  Weekday    当季新品   \n",
       "518         335   上海      线下       Female     30-34  Weekend      T恤   \n",
       "574         315   武汉      线下       Female     25-29  Weekend      T恤   \n",
       "669         802   西安      线下         Male      >=60  Weekday      T恤   \n",
       "810         325   上海      线下       Female     25-29  Weekday     牛仔裤   \n",
       "...         ...  ...     ...          ...       ...      ...     ...   \n",
       "22277       611   深圳      线下         Male     20-24  Weekday      T恤   \n",
       "22278        70   深圳      线下         Male      >=60  Weekend      短裤   \n",
       "22280        21   北京      线下       Female     35-39  Weekend      T恤   \n",
       "22289       430   成都      线下       Female     25-29  Weekend      T恤   \n",
       "22290       449   武汉      线下       Female     35-39  Weekday      T恤   \n",
       "\n",
       "       customer  revenue  order  quant  unit_cost  unit_price  \n",
       "217           1     79.0      1      1         59          79  \n",
       "518           1     79.0      1      1         49          79  \n",
       "574           1     79.0      1      1         49          79  \n",
       "669           1     59.0      1      1         49          59  \n",
       "810           1     59.0      1      1         69          59  \n",
       "...         ...      ...    ...    ...        ...         ...  \n",
       "22277         1     79.0      1      1         49          79  \n",
       "22278         1     40.0      1      1         19          40  \n",
       "22280         1     59.0      1      1         49          59  \n",
       "22289         1     79.0      1      1         49          79  \n",
       "22290         1    158.0      1      2         49          79  \n",
       "\n",
       "[3208 rows x 13 columns]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#4、数据清洗：打印重复值\n",
    "df=data1[data1.duplicated()]\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "371ceacf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "data每个特征缺失的数目为：\n",
      " store_id        0\n",
      "city            0\n",
      "channel         0\n",
      "gender_group    0\n",
      "age_group       0\n",
      "wkd_ind         0\n",
      "product         0\n",
      "customer        0\n",
      "revenue         0\n",
      "order           0\n",
      "quant           0\n",
      "unit_cost       0\n",
      "unit_price      0\n",
      "dtype: int64\n",
      "data每个特征非缺失的数目为：\n",
      " store_id        22293\n",
      "city            22293\n",
      "channel         22293\n",
      "gender_group    22293\n",
      "age_group       22293\n",
      "wkd_ind         22293\n",
      "product         22293\n",
      "customer        22293\n",
      "revenue         22293\n",
      "order           22293\n",
      "quant           22293\n",
      "unit_cost       22293\n",
      "unit_price      22293\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "#数据清洗：检测缺失值\n",
    "print('data每个特征缺失的数目为：\\n',data1.isnull().sum())\n",
    "print('data每个特征非缺失的数目为：\\n',data1.notnull().sum())\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "655de0eb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>4</td>\n",
       "      <td>796.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>59</td>\n",
       "      <td>199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>运动</td>\n",
       "      <td>1</td>\n",
       "      <td>149.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>&gt;=60</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>2</td>\n",
       "      <td>178.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>20-24</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>袜子</td>\n",
       "      <td>2</td>\n",
       "      <td>65.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22288</th>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>30-34</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>短裤</td>\n",
       "      <td>1</td>\n",
       "      <td>80.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>19</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22289</th>\n",
       "      <td>成都</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22290</th>\n",
       "      <td>武汉</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>35-39</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>158.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22291</th>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>20-24</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>袜子</td>\n",
       "      <td>1</td>\n",
       "      <td>26.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22292</th>\n",
       "      <td>成都</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>30-34</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>59</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22293 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      city channel gender_group age_group  wkd_ind product  customer  revenue  \\\n",
       "0       深圳      线下       Female     25-29  Weekday    当季新品         4    796.0   \n",
       "1       杭州      线下       Female     25-29  Weekday      运动         1    149.0   \n",
       "2       深圳      线下         Male      >=60  Weekday      T恤         2    178.0   \n",
       "3       深圳      线下       Female     25-29  Weekday      T恤         1     59.0   \n",
       "4       深圳      线下         Male     20-24  Weekend      袜子         2     65.0   \n",
       "...    ...     ...          ...       ...      ...     ...       ...      ...   \n",
       "22288   杭州      线下       Female     30-34  Weekday      短裤         1     80.0   \n",
       "22289   成都      线下       Female     25-29  Weekend      T恤         1     79.0   \n",
       "22290   武汉      线下       Female     35-39  Weekday      T恤         1    158.0   \n",
       "22291   杭州      线下       Female     20-24  Weekday      袜子         1     26.0   \n",
       "22292   成都      线下         Male     30-34  Weekday    当季新品         1     79.0   \n",
       "\n",
       "       order  quant  unit_cost  unit_price  \n",
       "0          4      4         59         199  \n",
       "1          1      1         49         149  \n",
       "2          2      2         49          89  \n",
       "3          1      1         49          59  \n",
       "4          2      3          9          22  \n",
       "...      ...    ...        ...         ...  \n",
       "22288      1      2         19          40  \n",
       "22289      1      1         49          79  \n",
       "22290      1      2         49          79  \n",
       "22291      1      1          9          26  \n",
       "22292      1      1         59          79  \n",
       "\n",
       "[22293 rows x 12 columns]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#数据清洗：删除无意义列（store_id为门店随机编号id，无实际意义）\n",
    "data1.drop(['store_id'], axis=1, inplace=True) \n",
    "data1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "67c6ca57",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Female    14208\n",
       "Male       7967\n",
       "Unkown      118\n",
       "Name: gender_group, dtype: int64"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#7、数据清洗：查找性别异常值\n",
    "data1['gender_group'].unique()\n",
    "data1['gender_group'].value_counts()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "f4392ef7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "30-34     4426\n",
       "25-29     4224\n",
       "35-39     3691\n",
       "20-24     3345\n",
       "40-44     1955\n",
       ">=60      1574\n",
       "45-49     1095\n",
       "50-54      672\n",
       "<20        660\n",
       "55-59      514\n",
       "Unkown     137\n",
       "Name: age_group, dtype: int64"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#8、数据清洗：查找性别异常值\n",
    "data1['age_group'].unique()\n",
    "data1['age_group'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "41a352a9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:xlabel='wkd_ind', ylabel='revenue'>"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAE+CAYAAACJGbf9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAU7UlEQVR4nO3de5BedX3H8fduEoKQizGuAwiIAvOtEYpFUBoLAZRbK1QdhApys4hi8VKtwtRW4mAdQccWtaiV6qAIGtARRFRQSeQi5RIRHDJfRAICxZBEKEmbBMhu/zgn5PmF3c0+u/vs2Wzer5md53nO5Xe+m5xnP+f6O119fX1IkrRBd9MFSJLGF4NBklQwGCRJBYNBklQwGCRJhclNFzBCU4H9gceA9Q3XIklbiknAjsDtwLpNR27pwbA/cGPTRUjSFupA4KZNB27pwfAYwBNP/C+9vd6PIUlD0d3dxaxZ20P9N3RTW3owrAfo7e0zGCSpff0egvfksySpYDBIkgoGgySpYDBIkgoGgySp0PGrkiJiCnAVcEFmLoyI64Bt6tEvAW7MzHdHxL3A4/XwRZl5bqdrkyQ9X0eDISImU4XCrhuGZebhLeOvBr4QETsD92fmMZ2sR5K0eWNxKOkM4I5NB0bEocBjmfkb4CBgn4i4KSJuiYj9xqAuSVI/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ZvtQWg0Ha6E7gEOA+4CGqPYUVwK8y89fAPwOfqae9DTgqImZGxL7An45guf11WDaa7UttMRikWn2Y6GGqYLiP6uFDreN/BqyNiLdm5s1UD365j+rBRfeOci0dbV8ajL2rSpIKXpUkjaKIuJ364UWbeFlmrhvreqThcI9BklTwHIMkqWAwSJIKBoMkqWAwSJIKBoMkqfD/oYyGa5RGzrsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 销售额随时间的变化\n",
    "plt.figure(figsize=(6,5))\n",
    "sns.barplot(x='wkd_ind',y='revenue',data=data1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "a5a6d9c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>wkd_ind</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Weekday</th>\n",
       "      <td>12465.0</td>\n",
       "      <td>167.986200</td>\n",
       "      <td>310.773434</td>\n",
       "      <td>-0.66</td>\n",
       "      <td>66.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>192.0</td>\n",
       "      <td>12538.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Weekend</th>\n",
       "      <td>9828.0</td>\n",
       "      <td>148.807984</td>\n",
       "      <td>224.537169</td>\n",
       "      <td>0.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>7919.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           count        mean         std   min   25%   50%    75%      max\n",
       "wkd_ind                                                                   \n",
       "Weekday  12465.0  167.986200  310.773434 -0.66  66.0  99.0  192.0  12538.0\n",
       "Weekend   9828.0  148.807984  224.537169  0.00  59.0  99.0  158.0   7919.0"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1.groupby('wkd_ind').revenue.describe()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "254953a0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>product</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>T恤</th>\n",
       "      <td>10610.0</td>\n",
       "      <td>145.027789</td>\n",
       "      <td>154.278714</td>\n",
       "      <td>0.00</td>\n",
       "      <td>79.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>6636.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>当季新品</th>\n",
       "      <td>2540.0</td>\n",
       "      <td>232.545228</td>\n",
       "      <td>597.253282</td>\n",
       "      <td>0.00</td>\n",
       "      <td>76.0</td>\n",
       "      <td>111.0</td>\n",
       "      <td>197.0</td>\n",
       "      <td>12538.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>毛衣</th>\n",
       "      <td>807.0</td>\n",
       "      <td>304.375217</td>\n",
       "      <td>290.733202</td>\n",
       "      <td>0.00</td>\n",
       "      <td>149.0</td>\n",
       "      <td>199.0</td>\n",
       "      <td>396.0</td>\n",
       "      <td>4975.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>牛仔裤</th>\n",
       "      <td>1412.0</td>\n",
       "      <td>174.311246</td>\n",
       "      <td>238.681718</td>\n",
       "      <td>0.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>199.0</td>\n",
       "      <td>2087.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>短裤</th>\n",
       "      <td>1694.0</td>\n",
       "      <td>63.450933</td>\n",
       "      <td>55.646467</td>\n",
       "      <td>0.00</td>\n",
       "      <td>37.0</td>\n",
       "      <td>40.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>676.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>袜子</th>\n",
       "      <td>2053.0</td>\n",
       "      <td>62.216931</td>\n",
       "      <td>51.183226</td>\n",
       "      <td>0.00</td>\n",
       "      <td>27.0</td>\n",
       "      <td>52.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>595.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>裙子</th>\n",
       "      <td>629.0</td>\n",
       "      <td>218.287409</td>\n",
       "      <td>172.449212</td>\n",
       "      <td>10.00</td>\n",
       "      <td>99.0</td>\n",
       "      <td>197.0</td>\n",
       "      <td>237.0</td>\n",
       "      <td>1442.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>运动</th>\n",
       "      <td>976.0</td>\n",
       "      <td>120.962787</td>\n",
       "      <td>142.740403</td>\n",
       "      <td>-0.66</td>\n",
       "      <td>39.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>149.0</td>\n",
       "      <td>1257.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>配件</th>\n",
       "      <td>1572.0</td>\n",
       "      <td>282.878594</td>\n",
       "      <td>398.705054</td>\n",
       "      <td>0.00</td>\n",
       "      <td>99.0</td>\n",
       "      <td>149.0</td>\n",
       "      <td>298.0</td>\n",
       "      <td>4187.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           count        mean         std    min    25%    50%    75%       max\n",
       "product                                                                       \n",
       "T恤       10610.0  145.027789  154.278714   0.00   79.0   99.0  158.0   6636.00\n",
       "当季新品      2540.0  232.545228  597.253282   0.00   76.0  111.0  197.0  12538.00\n",
       "毛衣         807.0  304.375217  290.733202   0.00  149.0  199.0  396.0   4975.00\n",
       "牛仔裤       1412.0  174.311246  238.681718   0.00   59.0   79.0  199.0   2087.00\n",
       "短裤        1694.0   63.450933   55.646467   0.00   37.0   40.0   77.0    676.00\n",
       "袜子        2053.0   62.216931   51.183226   0.00   27.0   52.0   79.0    595.36\n",
       "裙子         629.0  218.287409  172.449212  10.00   99.0  197.0  237.0   1442.00\n",
       "运动         976.0  120.962787  142.740403  -0.66   39.0   78.0  149.0   1257.00\n",
       "配件        1572.0  282.878594  398.705054   0.00   99.0  149.0  298.0   4187.00"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1.groupby(['product']).revenue.describe()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "885eda68",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>city</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海</th>\n",
       "      <td>2391.0</td>\n",
       "      <td>163.037110</td>\n",
       "      <td>258.466930</td>\n",
       "      <td>18.00</td>\n",
       "      <td>70.5</td>\n",
       "      <td>99.0</td>\n",
       "      <td>197.0</td>\n",
       "      <td>6636.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京</th>\n",
       "      <td>577.0</td>\n",
       "      <td>226.098128</td>\n",
       "      <td>282.353472</td>\n",
       "      <td>19.00</td>\n",
       "      <td>79.0</td>\n",
       "      <td>118.0</td>\n",
       "      <td>237.0</td>\n",
       "      <td>2579.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>南京</th>\n",
       "      <td>500.0</td>\n",
       "      <td>246.301860</td>\n",
       "      <td>665.015629</td>\n",
       "      <td>18.00</td>\n",
       "      <td>79.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>199.0</td>\n",
       "      <td>12538.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广州</th>\n",
       "      <td>2188.0</td>\n",
       "      <td>145.395105</td>\n",
       "      <td>163.495816</td>\n",
       "      <td>0.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>2081.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>成都</th>\n",
       "      <td>1529.0</td>\n",
       "      <td>136.160798</td>\n",
       "      <td>216.349093</td>\n",
       "      <td>10.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>94.0</td>\n",
       "      <td>149.0</td>\n",
       "      <td>6150.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>杭州</th>\n",
       "      <td>3785.0</td>\n",
       "      <td>155.751252</td>\n",
       "      <td>287.547853</td>\n",
       "      <td>10.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>98.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>8836.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>武汉</th>\n",
       "      <td>3567.0</td>\n",
       "      <td>165.342803</td>\n",
       "      <td>285.732075</td>\n",
       "      <td>-0.66</td>\n",
       "      <td>73.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>7919.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>深圳</th>\n",
       "      <td>4364.0</td>\n",
       "      <td>167.993511</td>\n",
       "      <td>281.069181</td>\n",
       "      <td>10.00</td>\n",
       "      <td>74.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>189.0</td>\n",
       "      <td>5947.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>西安</th>\n",
       "      <td>1605.0</td>\n",
       "      <td>131.323751</td>\n",
       "      <td>139.224107</td>\n",
       "      <td>0.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>93.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>1743.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>重庆</th>\n",
       "      <td>1787.0</td>\n",
       "      <td>147.449720</td>\n",
       "      <td>295.133144</td>\n",
       "      <td>10.00</td>\n",
       "      <td>59.0</td>\n",
       "      <td>99.0</td>\n",
       "      <td>158.0</td>\n",
       "      <td>10498.28</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       count        mean         std    min   25%    50%    75%       max\n",
       "city                                                                     \n",
       "上海    2391.0  163.037110  258.466930  18.00  70.5   99.0  197.0   6636.00\n",
       "北京     577.0  226.098128  282.353472  19.00  79.0  118.0  237.0   2579.00\n",
       "南京     500.0  246.301860  665.015629  18.00  79.0   99.0  199.0  12538.00\n",
       "广州    2188.0  145.395105  163.495816   0.00  59.0   99.0  158.0   2081.00\n",
       "成都    1529.0  136.160798  216.349093  10.00  59.0   94.0  149.0   6150.00\n",
       "杭州    3785.0  155.751252  287.547853  10.00  59.0   98.0  158.0   8836.00\n",
       "武汉    3567.0  165.342803  285.732075  -0.66  73.0   99.0  158.0   7919.00\n",
       "深圳    4364.0  167.993511  281.069181  10.00  74.0   99.0  189.0   5947.00\n",
       "西安    1605.0  131.323751  139.224107   0.00  59.0   93.0  158.0   1743.00\n",
       "重庆    1787.0  147.449720  295.133144  10.00  59.0   99.0  158.0  10498.28"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1.groupby(['city']).revenue.describe()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "dd8ee303",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "      <th>margin</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>4</td>\n",
       "      <td>796.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>59</td>\n",
       "      <td>199</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>杭州</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>运动</td>\n",
       "      <td>1</td>\n",
       "      <td>149.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>149</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>&gt;=60</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>2</td>\n",
       "      <td>178.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>89</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Female</td>\n",
       "      <td>25-29</td>\n",
       "      <td>Weekday</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>59</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>深圳</td>\n",
       "      <td>线下</td>\n",
       "      <td>Male</td>\n",
       "      <td>20-24</td>\n",
       "      <td>Weekend</td>\n",
       "      <td>袜子</td>\n",
       "      <td>2</td>\n",
       "      <td>65.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>22</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  city channel gender_group age_group  wkd_ind product  customer  revenue  \\\n",
       "0   深圳      线下       Female     25-29  Weekday    当季新品         4    796.0   \n",
       "1   杭州      线下       Female     25-29  Weekday      运动         1    149.0   \n",
       "2   深圳      线下         Male      >=60  Weekday      T恤         2    178.0   \n",
       "3   深圳      线下       Female     25-29  Weekday      T恤         1     59.0   \n",
       "4   深圳      线下         Male     20-24  Weekend      袜子         2     65.0   \n",
       "\n",
       "   order  quant  unit_cost  unit_price  margin  \n",
       "0      4      4         59         199     140  \n",
       "1      1      1         49         149     100  \n",
       "2      2      2         49          89      40  \n",
       "3      1      1         49          59      10  \n",
       "4      2      3          9          22      13  "
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 新增'利润'字段\n",
    "data1['margin']= data1.unit_price - data1.unit_cost\n",
    "data1.head()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "196a10b9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "      <th>margin</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>深圳</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25-29</td>\n",
       "      <td>0</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>4</td>\n",
       "      <td>796.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>59</td>\n",
       "      <td>199</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>杭州</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25-29</td>\n",
       "      <td>0</td>\n",
       "      <td>运动</td>\n",
       "      <td>1</td>\n",
       "      <td>149.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>149</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>深圳</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>&gt;=60</td>\n",
       "      <td>0</td>\n",
       "      <td>T恤</td>\n",
       "      <td>2</td>\n",
       "      <td>178.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>89</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>深圳</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25-29</td>\n",
       "      <td>0</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>59.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>59</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>深圳</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>20-24</td>\n",
       "      <td>1</td>\n",
       "      <td>袜子</td>\n",
       "      <td>2</td>\n",
       "      <td>65.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>22</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22288</th>\n",
       "      <td>杭州</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>30-34</td>\n",
       "      <td>0</td>\n",
       "      <td>短裤</td>\n",
       "      <td>1</td>\n",
       "      <td>80.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>19</td>\n",
       "      <td>40</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22289</th>\n",
       "      <td>成都</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25-29</td>\n",
       "      <td>1</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22290</th>\n",
       "      <td>武汉</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>35-39</td>\n",
       "      <td>0</td>\n",
       "      <td>T恤</td>\n",
       "      <td>1</td>\n",
       "      <td>158.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>79</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22291</th>\n",
       "      <td>杭州</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>20-24</td>\n",
       "      <td>0</td>\n",
       "      <td>袜子</td>\n",
       "      <td>1</td>\n",
       "      <td>26.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>26</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22292</th>\n",
       "      <td>成都</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>30-34</td>\n",
       "      <td>0</td>\n",
       "      <td>当季新品</td>\n",
       "      <td>1</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>59</td>\n",
       "      <td>79</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22293 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      city channel gender_group age_group wkd_ind product  customer  revenue  \\\n",
       "0       深圳       1            0     25-29       0    当季新品         4    796.0   \n",
       "1       杭州       1            0     25-29       0      运动         1    149.0   \n",
       "2       深圳       1            1      >=60       0      T恤         2    178.0   \n",
       "3       深圳       1            0     25-29       0      T恤         1     59.0   \n",
       "4       深圳       1            1     20-24       1      袜子         2     65.0   \n",
       "...    ...     ...          ...       ...     ...     ...       ...      ...   \n",
       "22288   杭州       1            0     30-34       0      短裤         1     80.0   \n",
       "22289   成都       1            0     25-29       1      T恤         1     79.0   \n",
       "22290   武汉       1            0     35-39       0      T恤         1    158.0   \n",
       "22291   杭州       1            0     20-24       0      袜子         1     26.0   \n",
       "22292   成都       1            1     30-34       0    当季新品         1     79.0   \n",
       "\n",
       "       order  quant  unit_cost  unit_price  margin  \n",
       "0          4      4         59         199     140  \n",
       "1          1      1         49         149     100  \n",
       "2          2      2         49          89      40  \n",
       "3          1      1         49          59      10  \n",
       "4          2      3          9          22      13  \n",
       "...      ...    ...        ...         ...     ...  \n",
       "22288      1      2         19          40      21  \n",
       "22289      1      1         49          79      30  \n",
       "22290      1      2         49          79      30  \n",
       "22291      1      1          9          26      17  \n",
       "22292      1      1         59          79      20  \n",
       "\n",
       "[22293 rows x 13 columns]"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1.replace('Weekday','0', inplace=True)\n",
    "data1.replace('Weekend','1', inplace=True)\n",
    "data1.replace('线上','0', inplace=True)\n",
    "data1.replace('线下','1', inplace=True)\n",
    "data1.replace('Female','0', inplace=True)\n",
    "data1.replace('Male','1', inplace=True)\n",
    "data1.replace('Unknow','2', inplace=True)\n",
    "data1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "b9e31e2c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "      <th>margin</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1154</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>181</td>\n",
       "      <td>191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>432</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>132</td>\n",
       "      <td>151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>501</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>78</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>152</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>48</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>163</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22288</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>245</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>29</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22289</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>244</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>68</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22290</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>462</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>68</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22291</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>22</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22292</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>244</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>68</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22293 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       city  channel  gender_group  age_group  wkd_ind  product  customer  \\\n",
       "0         7        1             0          1        0        1         3   \n",
       "1         5        1             0          1        0        7         0   \n",
       "2         7        1             1          9        0        0         1   \n",
       "3         7        1             0          1        0        0         0   \n",
       "4         7        1             1          0        1        5         1   \n",
       "...     ...      ...           ...        ...      ...      ...       ...   \n",
       "22288     5        1             0          2        0        4         0   \n",
       "22289     4        1             0          1        1        0         0   \n",
       "22290     6        1             0          3        0        0         0   \n",
       "22291     5        1             0          0        0        5         0   \n",
       "22292     4        1             1          2        0        1         0   \n",
       "\n",
       "       revenue  order  quant  unit_cost  unit_price  margin  \n",
       "0         1154      3      3          4         181     191  \n",
       "1          432      0      0          3         132     151  \n",
       "2          501      1      1          3          78      91  \n",
       "3          152      0      0          3          48      61  \n",
       "4          163      1      2          0          11      64  \n",
       "...        ...    ...    ...        ...         ...     ...  \n",
       "22288      245      0      1          1          29      72  \n",
       "22289      244      0      0          3          68      81  \n",
       "22290      462      0      1          3          68      81  \n",
       "22291       22      0      0          0          15      68  \n",
       "22292      244      0      0          4          68      71  \n",
       "\n",
       "[22293 rows x 13 columns]"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "warnings.filterwarnings('ignore') # 忽略报错(警告)\n",
    "\n",
    "from sklearn.preprocessing import LabelEncoder\n",
    "# 使用LabelEncoder编码——按照数据的首字母者数字依次排序并依次赋予编码0,1,2……\n",
    "for i in ['channel','gender_group','age_group','wkd_ind','product','customer','revenue','order','quant','unit_cost','unit_price','margin']:\n",
    "    data1[i] = LabelEncoder().fit_transform(data1[i])  \n",
    "# 对于GenHealth列，如果利用LabelEncoder编码，就不是我们想要的按照Excellent - Yery good - Good - Fair - Poor编码为4,3,2,1,0；所以干脆替换\n",
    "data1.loc[:,'city'] = data1.loc[:,'city'].replace(['上海','北京','南京','广州','成都','杭州','武汉','深圳','西安','重庆'],[0,1,2,3,4,5,6,7,8,9])\n",
    "data1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "faaa8955",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>city</th>\n",
       "      <th>channel</th>\n",
       "      <th>gender_group</th>\n",
       "      <th>age_group</th>\n",
       "      <th>wkd_ind</th>\n",
       "      <th>product</th>\n",
       "      <th>customer</th>\n",
       "      <th>revenue</th>\n",
       "      <th>order</th>\n",
       "      <th>quant</th>\n",
       "      <th>unit_cost</th>\n",
       "      <th>unit_price</th>\n",
       "      <th>margin</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0.818440</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>0.666667</td>\n",
       "      <td>0.857820</td>\n",
       "      <td>0.852679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0.306383</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.625592</td>\n",
       "      <td>0.674107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.355319</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.369668</td>\n",
       "      <td>0.406250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.107801</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.227488</td>\n",
       "      <td>0.272321</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0.115603</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.052133</td>\n",
       "      <td>0.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22288</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>0.173759</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>0.137441</td>\n",
       "      <td>0.321429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22289</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.173050</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.322275</td>\n",
       "      <td>0.361607</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22290</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.327660</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.322275</td>\n",
       "      <td>0.361607</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22291</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>0.015603</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.071090</td>\n",
       "      <td>0.303571</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22292</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.173050</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.666667</td>\n",
       "      <td>0.322275</td>\n",
       "      <td>0.316964</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22293 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       city  channel  gender_group  age_group  wkd_ind  product  customer  \\\n",
       "0         7        1             0          1        0        1         3   \n",
       "1         5        1             0          1        0        7         0   \n",
       "2         7        1             1          9        0        0         1   \n",
       "3         7        1             0          1        0        0         0   \n",
       "4         7        1             1          0        1        5         1   \n",
       "...     ...      ...           ...        ...      ...      ...       ...   \n",
       "22288     5        1             0          2        0        4         0   \n",
       "22289     4        1             0          1        1        0         0   \n",
       "22290     6        1             0          3        0        0         0   \n",
       "22291     5        1             0          0        0        5         0   \n",
       "22292     4        1             1          2        0        1         0   \n",
       "\n",
       "        revenue  order  quant  unit_cost  unit_price    margin  \n",
       "0      0.818440      3      3   0.666667    0.857820  0.852679  \n",
       "1      0.306383      0      0   0.500000    0.625592  0.674107  \n",
       "2      0.355319      1      1   0.500000    0.369668  0.406250  \n",
       "3      0.107801      0      0   0.500000    0.227488  0.272321  \n",
       "4      0.115603      1      2   0.000000    0.052133  0.285714  \n",
       "...         ...    ...    ...        ...         ...       ...  \n",
       "22288  0.173759      0      1   0.166667    0.137441  0.321429  \n",
       "22289  0.173050      0      0   0.500000    0.322275  0.361607  \n",
       "22290  0.327660      0      1   0.500000    0.322275  0.361607  \n",
       "22291  0.015603      0      0   0.000000    0.071090  0.303571  \n",
       "22292  0.173050      0      0   0.666667    0.322275  0.316964  \n",
       "\n",
       "[22293 rows x 13 columns]"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 采用归一化将数据缩放到0-1之间\n",
    "from sklearn.preprocessing import MinMaxScaler\n",
    "\n",
    "data1_SVM_1 = data1\n",
    "column_lst=['revenue','unit_cost','unit_price','margin']\n",
    "for i in column_lst:\n",
    "    data1_SVM_1[i]=MinMaxScaler().fit_transform(data1_SVM_1[i].values.reshape(-1,1)).reshape(1,-1)[0]\n",
    "data1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "0e2d70b9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x23833d4d550>"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD5CAYAAADcDXXiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAA4w0lEQVR4nO29eZwcVbnH/T1Vvc6+ZoEEgSQUmwhoUJA1YhSUqCjgxiKKK4qyXFDuVRR9VfTVCxdBRAV9UQTxilwX9LJdWVUIoLKUIFtCWDKTmczaW9V5/6ienumYyfR01czpUznfz6c/U52cPvN7pqqePvWc5zxHSCkxGAwGQ7ywVAswGAwGQ/QY524wGAwxxDh3g8FgiCHGuRsMBkMMMc7dYDAYYkhCtQAgDawEXgA8xVoMBoNBF2xgMfAXIL/lfzaCc18J3KlahMFgMGjKIcBdW/5jIzj3FwAGBkbx/dnn3Hd3t9DfPxK5qEbG2Lx9YGzePqjXZssSdHY2Q9mHbkkjOHcPwPdlXc594rPbG8bm7QNj8/ZBSJu3Gs42E6oGg8EQQ4xzNxgMhhhinLvBYDDEEOPcDQaDIYbUNKHqOE4S+BVwkeu6d2yj3bnACcDLwMmu674UhUiDwWAwzI4ZnbvjOAkCx77TDO0OAtYQ5K0fBlwIfDgCjQaN6Oxsw7aD45GRpeRyj6gVZDBsp9QalvkwcP8MbVYD17qu6wG3AweGEWbQE9sGIYLj5uZ1asUYDNsxM47cXdctAesdx5mpaSuwtvwZ6ThO82yEdHe3zKZ5Fb29rXV/Vlca1mYZvATBK0qdDWvzHGJs3j6YC5ujXMQ0BEx16G2z+XB//0hdify9va1s3Dg868/pTCPb3N0Flgh8fKFwGEPD0ehsZJvnCmPz9kG9NluW2OagOM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aZxXnOAlcCuwJdwJdd171m/hWHZxY2v4ogW2YP4FngQ67r3j3/iqPDcZyrgatd173DcZzzmWP/pYVzB3AcJw0cA7ywrZNca7tGJy52zAZjs7F5eyfKv402zt1gMBgMtaNLzN1gMBgMs8A4d4PBYIghxrkbDAZDDDHO3WAwGGKIce4Gg8EQQ/5/ypG54fEiQ8gAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X_1 = data1_SVM_1['unit_cost']\n",
    "X_2 = data1_SVM_1['unit_price']\n",
    "y = data1_SVM_1['margin']\n",
    "plt.scatter(X_1,X_2,c=y,s=5,cmap='autumn')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "739a4421",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x21d3bc481c0>"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAD2CAYAAAAksGdNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAA2RklEQVR4nO2deXxU1d3/32dmkpCErCTsElYFBEGNO2pwwa3WpVq3uitqq/XXVftUH61aqz5Wa2uxgFuf2mr1catKRa3iVlyCoLghKCDIDgnZyDrn98d30hkwmDDnJmfOcN6v17xy8+Jy+Fzu3O8953u+i9Ja4/F4PB63CdkW4PF4PB5zvDH3eDyeNMAbc4/H40kDvDH3eDyeNMAbc4/H40kDIjb+0ZKSEj106FAb/7TH4/E4y7x58zZorUs7+jMrxnzo0KFUVlba+Kc9Ho/HWZRSy7f3Z97N4vF4PGmAN+Yej8eTBnhj7vF4PGmAN+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wAbApTjAv6adw78Ne8cmFxzmda6tKM/sGLMTVBKVW6vB1664q9558Bf885Bd12zd7N4PB5PGuCNucfj8aQBLhrzGbYFWMBf886Bv+adg265Zud85h6Px+P5Oi7OzD0ej8ezDd6YezweTxqQssY8JfqO9jCdXY9SqkAp9U+l1AtKqSeVUpk9rTFounoPlVL9lFKO99gTduCapymlju8pXd1JF77bRUqpWbFuZNN7Wl93EPvOvt7JOYHZsJQ05inTd7QH6eL1nAXcobWeAqwBju5JjUGzg/fwduINUJylq9eslDoY6K+1drwVVZev+Wzgr7H46zyllNOx50qpIuDPSBe27Z0TqA1LSWNOQH1HHaOCTq5Haz1Na/1i7NdSYF3PSOs2KujCPVRKHQbUIy8w16mg8365GcBMYJlS6oSek9ZtVND5fd4IjFNKFQK7AK63fWoDTgNqvuGcCgK0YalqzLftKdovyXNcosvXo5Q6ACjSWr/VE8K6kU6vOeZKuha4ugd1dSdduc/nAB8DtwH7KqWu6CFt3UVXrvkNoAz4IfBJ7Dxn0VrXdKGvQ6A2LFWNeer0He05unQ9Sqli4A/ABT2kqzvpyjVfDUzTWlf3lKhupivXvCcwQ2u9BngImNxD2rqLrlzzdcClWusbgE+B83tIm00CtWGpagB3xr6jnV5PbJb6GPALrXWyhcpSia7cwyOAHyil5gATlVL39oy0bqMr17wEGB47Lif5onSpQleuuQgYr5QKA/sBO0MCTLA2TGudch8gH3gfuANZck0AburknALbunvgmi8DqoA5sc9ptnV39zVvc/4c25p76D7nIS/t14C5wCDbunvgmvcFPkJmqy8CvW3rDuja58R+ju1uG5ayGaCx3eAjgde0LDeTOscl0u16uoK/Zn/NOzNB/r+krDH3eDweT9dJVZ+5x+PxeHYAb8w9Ho8nDfDG3OPxeNIAb8w9Ho8nDfDG3OPxeNKA/w8rVmchQQ3M+wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X_1 = data1_SVM_1['unit_cost']\n",
    "X_2 = data1_SVM_1['unit_price']\n",
    "y = data1_SVM_1['revenue']\n",
    "plt.scatter(X_1,X_2,c=y,s=5,cmap='autumn')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "a076847f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC(C=10000000000.0, kernel='linear')"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.svm import SVC\n",
    "model = SVC(kernel='linear',C=1E10) # kernel核函数选择linear线性\n",
    "model.fit(pd.concat([X_1,X_2],axis=1),y.astype('int'))\n",
    "model\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "ccc96ea3",
   "metadata": {},
   "outputs": [],
   "source": [
    "#采用“channel”进行切分\n",
    "data1_shenjingwangluo = data1.copy()\n",
    "X = data1_shenjingwangluo.drop(columns=['channel'])\n",
    "y = data1_shenjingwangluo['channel']\n",
    "from sklearn.model_selection import train_test_split\n",
    "X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.2,random_state = 0)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "60dfb7b9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8199147790984526"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.neural_network import MLPClassifier\n",
    "clf = MLPClassifier(solver='lbfgs', alpha=1e-5,\n",
    "hidden_layer_sizes=(5, 2), random_state=0)\n",
    "clf.fit(X_train,y_train)\n",
    "iris_y_predict = clf.predict(X_test)\n",
    "score=clf.score(X_test,y_test,sample_weight=None)\n",
    "score\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "566dc3b1",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.neural_network import MLPClassifier\n",
    "clf = MLPClassifier(solver='lbfgs', alpha=1e-5,\n",
    "hidden_layer_sizes=(5, 3), random_state=0)\n",
    "clf.fit(X_train,y_train)\n",
    "iris_y_predict = clf.predict(X_test)\n",
    "score=clf.score(X_test,y_test,sample_weight=None)\n",
    "score\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "168844d6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8461538461538461"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf = MLPClassifier(solver='lbfgs', alpha=1e-5,\n",
    "hidden_layer_sizes=(5,5,5), random_state=0)\n",
    "clf.fit(X_train,y_train)\n",
    "iris_y_predict = clf.predict(X_test)\n",
    "score=clf.score(X_test,y_test,sample_weight=None)\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "6bf3e66d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.84794797039695"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf = MLPClassifier(solver='lbfgs', alpha=1e-5,\n",
    "hidden_layer_sizes=(10,5,5), random_state=0)\n",
    "clf.fit(X_train,y_train)\n",
    "iris_y_predict = clf.predict(X_test)\n",
    "score=clf.score(X_test,y_test,sample_weight=None)\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "38f65f98",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
